import { http } from "@/utils/http";
import { globalDataStoreHook } from "@/store/modules/globalData";
import { whReqBaseUrl as VITE_REQUEST_BASE_SAAS_API } from "@/api/common";
// const baseUrl = VITE_REQUEST_BASE_YST;

const initCityId = globalDataStoreHook().cityId;

// 获取短信群发列表

export function getSmsTasks(data) {
  return http.get<any>(`${VITE_REQUEST_BASE_SAAS_API}/smsTasks`, {
    params: {
      ...data
    }
  });
}
// 查询短信群发明细
export function getSmsTaskDetail(id) {
  return http.get<any>(`${VITE_REQUEST_BASE_SAAS_API}/smsTasks/${id}`, {
    params: {}
  });
}

// 新增和编辑内容
export function createSmsTask(newData) {
  return http.postForm<any>(`${VITE_REQUEST_BASE_SAAS_API}/smsTasks`, {
    ...newData
  });
}

// 获取系统所有的短信签名列表
//
export function getSmsSignList() {
  return http.request<any>(
    "get",
    `${VITE_REQUEST_BASE_SAAS_API}/sms/querySmsSignList`
  );
}

// 查询模板列表

export function getSmsTemplateList() {
  return http.get<any>(
    `${VITE_REQUEST_BASE_SAAS_API}/sms/querySmsTemplateList`,
    {
      params: {}
    }
  );
}
